﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<%@ Import Namespace="ElectronicRecords.Models" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Справочник специалистов
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>
       <center><%=ViewData["Title"] %><br /></center> 
        <%=Html.ActionLink("Создать", "Create", new { }, new {@class="g-button" })%>
    </h2>

    <table id="maintable" >
        <tr>
            <th style="width:10%">
                Действие
            </th>
            <th style="width:10%">
                ID
            </th>
            <th style="width:40%">
                Фамилия
            </th>
             <th style="width:40%">
                Имя, Отчество
            </th>
        </tr>
        <% foreach (Specialists s in (IEnumerable<Specialists>)ViewData["Specialists"])
           {%>
        <tr>
            <td>
                <%=Html.ActionLink("Открыть", "Specialist", new { id = s.ID_Specialist })%>
                <br />
                <%=Html.ActionLink("Редактировать", "Edit", new { id = s.ID_Specialist })%>
                <br />
                <%=Html.ActionLink("Услуги", "Services", new { id = s.ID_Specialist })%>
                <br />
                <%=Html.ActionLink("Расписание", "ViewShedules", new { id = s.ID_Specialist, date = DateTime.Now.ToShortDateString() })%>
            </td>
            <td>
                <%=s.ID_Specialist %>
            </td>
            <td>
                <%=s.Firstname %>
            </td>
             <td>
                <%=s.Lastname %>
            </td>
        </tr>
        <%} %>
    </table>


</asp:Content>
